<nz-card [nzBordered]="false">
    <form nz-form [formGroup]="validateForm">
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="7">
                <label nz-form-item-required>新密码</label>
            </div>
            <div nz-col nz-form-control [nzSpan]="12">
                <input nz-input type="password" formControlName="newPwd" rows="1" placeholder="请输入新密码">
                <div nz-form-explain *ngIf="validateForm.get('newPwd').dirty && validateForm.get('newPwd').errors">
                    <ng-container
                        *ngIf="validateForm.get('newPwd').hasError('required') || validateForm.get('newPwd').hasError('empty') ">
                        请输入新密码！
                    </ng-container>
                    <ng-container *ngIf="validateForm.get('newPwd').hasError('maxlength')">
                        密码最多16位
                    </ng-container>
                    <ng-container *ngIf="validateForm.get('newPwd').hasError('minlength')">
                        密码最少6位
                    </ng-container>
                </div>
            </div>
        </div>
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="7">
                <label nz-form-item-required>确认新密码</label>
            </div>
            <div nz-col nz-form-control [nzSpan]="12">
                <input type="password" formControlName="newPwdConfirm" nz-input rows="1" placeholder="请确认新密码">
                <div nz-form-explain
                     *ngIf="validateForm.get('newPwdConfirm').dirty && validateForm.get('newPwdConfirm').errors">
                    <ng-container *ngIf="validateForm.get('newPwdConfirm').hasError('required')">
                        请确认新密码！
                    </ng-container>
                    <ng-container *ngIf="validateForm.get('newPwdConfirm').hasError('confirm')">
                        两次密码不一致！
                    </ng-container>
                </div>
            </div>
        </div>
        <div nz-form-item nz-row>
            <div nz-col nz-form-label [nzSpan]="7"></div>
            <div nz-col [nzSpan]="12">
                <button nz-button class="save-form-button" [nzType]="'primary'" [nzSize]="'large'"
                        (click)="submit()"
                        [disabled]="!validateForm.valid">
                    保存
                </button>
            </div>
        </div>
    </form>
</nz-card>
